
<style type="text/css">
.storelogo img{width:3.2rem;height:3.2rem}
.merchgroup .store-star {padding:0.1rem 0 0.2rem 0;font-size:0.55rem;line-height:1rem}
.merchgroup .store-star img{height:0.66rem}
.star-on,.star-off{position:absolute;top:1rem;left:0;overflow:hidden}
.star-rate {margin-left:3.6rem}
.store-distance{float:right;color:#999}
.store-moneylimit{font-size:0.55rem}
.desc {
	font-size:0.65rem;
	padding:0.5rem 0.2rem;
	color:#999
}
.store-star .star .shine {
    color: #fa672d;
}
.weui_cells_text {padding:0 10px;padding-top:10px}
p {
    margin: 0 0 2px;
}
.fui-tab-scroll .item a {color:#999}
.fui-tab-scroll .item.on,.fui-tab-scroll .item.on a{color:#333;font-weight: 400;position: relative;font-size:0.8rem}
.fui-tab-scroll .item.on:before {content: ""; height: 2px; width: 40%; background: #db232b; position: absolute; bottom:0; left: 30%}
.fui-tab-scroll .item.active{color:#db232b;}
.syscolor{color:#cdab6a}
.sysbgcolor{background-color:#cdab6a}
.jylabel-red {
	border: 1px solid #cdab6a;color:#cdab6a;background-color:#fff;
}
.jylabel-red.active,.jylabel-red:focus,.jylabel-red:hover,.jylabel-red[href]:focus,.jylabel-red[href]:hover {
	background-color:#cdab6a;color:#fff;
}
.jylabel-red.active,.jylabel-red:focus,.jylabel-red:hover,.jylabel-red[href]:focus,.jylabel-red[href]:hover {
	background-color:#cdab6a;
	color:#fff;
	border: 1px solid #cdab6a;color:#fff;
}
.fui-goods-item .detail .price .text {
    color: #cdab6a;
}
.fui-tab-scroll .item.on:before {background: #cdab6a;}
.carousel {margin-top:0}
.fui-header:after {
	border-bottom: 0 solid #D9D9D9;
}
.fui-searchbar {padding-top:0.3rem;padding-bottom:0.3rem;height:auto;border-top-right-radius:1rem;border-top-left-radius:1rem;}
.searchbar .search-input input {
    height: 1.6rem;
}
.search-input i {
    line-height: 1.7rem;
}
.fui-notice:before {
    border-top: 1px dashed #e2e2e2;
}

.fui-notice:after {
    border-top: 1px dashed #e2e2e2;
}
</style>
<div class="fui-page order-create-page fui-page-current" ng-if="pagedata.op == 'list'">
	<div class="fui-content">
		<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true">
			<div class="carousel-inner" role="listbox" style="height:6rem">
		<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.basic.hdps">
			<a href="{{item.url}}">
				<img ng-src="{{tomedia(item.picurl) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
			</a>
		</div>
		</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
				<div class="fui-swipe-bullet" ng-repeat="item in pagedata.basic.hdps" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
		</div>
		<div class="fui-searchbar bar" style="background:none">
			<div ng-class="{'searchbar center':1,'searchbar-active':pagedata.searchbar ==1}">
						<input type="button" ng-click="access(pagedata.op,made_query(pagedata.params))"  value="搜索" class="searchbar-cancel searchbtn">
						<div class="search-input" ng-click="pagedata.searchbar =1">
							<input type="search" placeholder="输入关键字" class="search" ng-model="pagedata.params.keyword">
						</div>
			</div>
		</div>
		<div class="fui-tab-scroll" style="padding-left:0.5rem;margin-top:-0.8rem">
			<div class="item on" style="height:2rem;line-height:2rem"><a href="javascript:;">预约项目</a></div>
		</div>
		<div style="padding: 0.25rem 0.5rem;width:100%">
			<div ng-repeat="item in pagedata.serve_list" class="fui-goods-group block" style="padding:0;margin-bottom:0.3rem">
				<div ng-include="sys_html('_severlistone')"></div>
			</div>
		</div>
		<div ng-show="loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
	</div>
</div>
<div class="fui-page order-create-page fui-page-current" ng-if="pagedata.op == 'sever_detail'">
	<div class="fui-content">
		<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true">
			<div class="carousel-inner" role="listbox" style="height:6rem">
		<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.banner">
			<a href="#">
				<img src="{{tomedia(item.picurl) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
			</a>
		</div>
		</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
				<div class="fui-swipe-bullet" ng-repeat="item in pagedata.banner" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
		</div>
		<div class="weui_cells weui_cells_form" style="margin-top:0">
			<div class="weui_cell">
				<div class="weui_cell_hd"><label class="weui_label"><i class="icon jinyunicon icon-gerenzhongxin" ></i> 访问人数 {{pagedata.serve.num}} <i class="icon jinyunicon icon-yuding" ></i> 已预约{{pagedata.serve.ordernum}}人</label></div>
			</div>
		</div>
		<div class="weui_cells_text red">
			<div class="bold" style="padding-bottom:0.3rem">{{pagedata.serve.title}}</div>
			<div ng-bind-html="trust(pagedata.serve.content)"></div>
		</div>
		<div ng-if="pagedata.serve.remark && false" class="weui_cells_title">项目说明</div>
		<div ng-if="pagedata.serve.remark" class="weui_cells" style="margin-top:0.5rem">
			<div class="weui_cell desc">
				{{pagedata.serve.remark}}
			 </div>
		</div>
		<div ng-if="pagedata.list.length>0" class="weui_cells_title">评论区 <span ng-click="access_json('jy_park_yuyue/commentlist//id='+pagedata.serve_id)" class="r-f" style="font-size:0.65rem">更多>></span></div>
		<div ng-include="sys_html('_comment')"></div>
		<div ng-if="pagedata.commentorderid" class="weui_btn_area">
			 <a class="weui_btn weui_btn_primary" href="javascript:"  ng-click="access_json('jy_park_yuyue/comment/commentorder/id='+pagedata.commentorderid)">评论</a>
		</div>
		<div class="weui_cells_title">预约日期</div>
		 <div class="fui-tab-scroll weui_cells_radio3" style="height: 3.2rem;overflow-y:hidden">
			<div ng-if="item.isshow==1" class="fui-icon-col" ng-repeat="item in pagedata.data" style="height: 3.2rem">
			    <label class="jyui_cell_col">
					<div ng-class="{'coltime':1,'colchecked':pagedata.post.dayid==$index}" ng-click="getdata(pagedata.serve.id,$index);pagedata.post.dayid=$index;">
						<div class="timetitle"><span>{{item.riqi}}</span></div>
						<div class="timetitle"><span>{{item.xinq}}</span></div>
					</div>
				</label>
			</div>
		</div>
		<div class="weui_cells_title">请选择预约时间</div>
		<div class="weui_cells" ng-if="pagedata.serve_time">
			<div ng-repeat="row in pagedata.serve_time" ng-if="row.yuyue > 0 && row.show == 1" class="jy-3">
				<div ng-class="{'yuyue-duan':1,'timeischack':pagedata.post.timeid == $index}" ng-click="pagedata.post.timeid=$index;">
					<div>{{row.times.start}}--{{row.times.end}}</div>
					<div>(剩余{{row.yuyue}}位)</div>
					<div class="clear"></div>
				</div>
			</div>
			<div ng-repeat="row in pagedata.serve_time" ng-if="row.yuyue == 0 || row.show == 0" class="jy-3 disabled">
				<div class="yuyue-duan">
					<div>{{row.times.start}}--{{row.times.end}}</div>
					<div>({{row.show==0?'休息':'约满'}})</div>
					<div class="clear"></div>
				</div>
			</div>
		</div>
		<div ng-show="pagedata.package.length>0" class="weui_cells_title">服务套餐</div>
		<div ng-show="pagedata.package.length>0" class="weui_cells weui_cells_radio2">
				<label class="weui_cell weui_check_label dashed" ng-repeat="item in pagedata.package">
					<div class="weui_cell_bd weui_cell_primary">
						<span style="float:left;width:100%">{{item.package_title}}</span>
						<span style="float:left;color:red;">价格：{{item.package_price}}</span>
					</div>
					<div class="weui_cell_ft" ng-click="pagedata.post.packageid=$index+1;">
						<input type="radio" class="weui_check" name="radio1">
						<span class="weui_icon_checked"></span>
					</div>
				</label>
		</div>
		<div ng-if="pagedata.worker_list.length>0" class="weui_cells_title">可预约{{pagedata.diy.worker || '技师'}}</div>
		<div ng-if="pagedata.worker_list.length>0" class="fui-tab-scroll" style="height:4.6rem" >
			<div class="xcontainer weui_cells_radio3" style="z-index:0;height: 4.6rem;padding:0.3rem" >
			    <label class="jyui_cell_member" style="width:3rem" ng-repeat="item1 in pagedata.worker_list">
					<div class="userimg" ng-click="pagedata.post.worker_id=item1.id;">
						<img class="img-circle"  ng-src="{{tomedia(item1.headimg) || '../core/resource/images/nopic.jpg'}}" style="width:3rem;height:3rem">
						<div class="imglogo-check" style="margin-left:2.2rem;margin-top:-1.8rem">
							<input type="radio" class="weui_check" name="radio2">
							<span class="weui_icon_checked"></span>
						</div>
					</div>
					<div>
						<span style="font-size:0.6rem">{{item1.name}}</span>
					</div>
				</label>
			</div>
		</div>
		<div ng-if="pagedata.serve.notice" class="weui_cells_text red">
				<div>{{pagedata.serve.notice}}</div>
		</div>
		<div class="weui_btn_area">
			 <a class="weui_btn weui_btn_primary" href="javascript:"  ng-click="pagedata.check_buy()">立即预约</a>
		</div>
</div>
<script type="text/javascript">
scope.pagedata.post.packageid = 0;
scope.pagedata.check_buy=function(){
	var serve_id=scope.pagedata.serve.id
	var worker_id=scope.pagedata.post.worker_id
	if(!worker_id && scope.pagedata.worker_list.length>0){
		scope.message('请选择技师！');
		return false;
	}
	var packageid=scope.pagedata.post.packageid
	var timeid=scope.pagedata.post.timeid
	var dayid=scope.pagedata.post.dayid
	scope.get('jy_park_yuyue/serve/check_buy/serve_id='+serve_id+'&worker_id='+worker_id+'&packageid='+packageid+'&timeid='+timeid+'&dayid='+dayid,function(res){});
}
scope.getdata = function(id,dayid){
		console.log(dayid);
		var params1 = {
					'plugin':'jy_park_yuyue',
					'action':'sever',
					'op':'serve_time',
					'query':'id='+id+'&day='+dayid,
					'data':{},
					'callback':function(data){
							console.log(data)
							if(data.success == 1){
								scope.$apply(function(){
									scope.pagedata.serve_time = data.serve_time;
								});
							}
					}
		}
		scope.post_json(params1);
}
if(scope.pagedata.serve){
	scope.getdata(scope.pagedata.serve.id,scope.pagedata.post.dayid);
}
</script>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
	require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
	});
</script>